'\" t
.\"
.\" Man page for pcp-buddyinfo
.\" Copyright (c) 2023 Oracle and/or its affiliates.
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
.\"
.\" This program is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License as published by the
.\" Free Software Foundation; either version 2 of the License, or (at your
.\" option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
.\" or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
.\" for more details.
.\"
.TH PCP-BUDDYINFO 1 "PCP" "Performance Co-Pilot"
.SH NAME
\f3pcp-buddyinfo\f3 \- report Linux kernel buddy algorithm statistics
.SH SYNOPSIS
\f3pcp\f1
[\f2pcp\ options\f1]
\f3buddyinfo\f1
[\f3\-uVz?\f1]
[\f3\-s\f1 \f2samples\f1]
[\f3\-a\f1 \f2archive\f1]
[\f3\-Z\f1 \f2timezone\f1]
.SH DESCRIPTION
The
.B pcp-buddyinfo
command is used for viewing different stats related to buddyinfo.
It helps users analyze the dynamic behaviour of the buddy algorithm
used in the Linux kernel virtual memory subsystem.
The information includes the total number of zones that are currently
active, counts of different order pages, and so on.
By default,
.B pcp-buddyinfo
reports live data for the local host.
.PP
The statistics shown are as follows:

.TS
lfB  lfB
l    lx.
HEADER          DESCRIPTION
_               _
Normal          zones available
Nodes           available nodes
Order0          available pages of order 0
Order1          available pages of order 1
Order2          available pages of order 2
Order3          available pages of order 3
Order4          available pages of order 4
Order5          available pages of order 5
Order6          available pages of order 6
Order7          available pages of order 7
Order8          available pages of order 8
Order9          available pages of order 9
Order10         available pages of order 10
.TE


Each column represents the number of pages of a certain order (a certain size) that are available at any given time. For example, for zone DMA (direct memory access), there are 90 of 2^(0*PAGE_SIZE) chunks of memory. Similarly, there are 6 of 2^(1*PAGE_SIZE) chunks, and 2 of 2^(2*PAGE_SIZE) chunks of memory available.
.PP
The DMA row references the first 16 MB on a system, the HighMem row references all memory greater than 4 GB on a system, and the Normal row references all memory in between.
.SH OPTIONS
.TP
\fB\-a\fR \fIfile\fR, \fB\-\-archive\fR=\fIfile\fR
Fetch buddyinfo metrics from the specified PCP archive.
.TP
\fB\-s\fR \fIcount\fR, \fB\-\-samples\fR=\fIcount\fR
Limit reporting to \fIcount\fR samples of buddyinfo statistics.
.TP
\fB\-u\fR, \fB\-\-no-interpol\fR
disable the default interpolation mode when replaying an archive.
With the
.B \-u
option, interpolated reporting is disabled and each sample is
reported according to native sampling intervals in the archive.
In this mode the
.B \-t
option is ignored.
Additionally, non-interpolated replay makes sense only when
replaying an archive (using the
.B \-a
option described above), so the
.B \-a
option is mandatory when
.B \-u
is specified.
.TP
\fB\-z\fR, \fB\-\-hostzone\fR
Use the local timezone of the host that is the source of the
performance metrics, as identified by either the
.B \-h
or the
.B \-a
options.
The default is to use the timezone of the local host.
.TP
\fB\-Z\fR \fItimezone\fR, \fB\-\-timezone\fR=\fItimezone\fR
Use
.I timezone
for the date and time.
.I Timezone
is in the format of the environment variable
.B TZ
as described in
.BR environ (7).
.TP
\fB\-V\fR, \fB\-\-version\fR
Display version number and exit.
.TP
\fB\-?\fR, \fB\-\-help\fR
Display usage message and exit.
.SH NOTES
.B pcp-buddyinfo
reports information extracted from the \fI/proc/buddyinfo\fP Linux
kernel procfs file.
.PP
If the default interpolation mode is disabled, it is possible that
some metrics (recorded at different intervals) will be reported as
having missing values for some samples even if they were recorded.
.SH PCP ENVIRONMENT
Environment variables with the prefix \fBPCP_\fP are used to parameterize the file and directory names used by PCP. On each installation, the file \fI/etc/pcp.conf\fP contains the local values for these variables. The \fB$PCP_CONF\fP variable may be used to specify an alternative configuration file, as described in \fBpcp.conf\fP(5).
.PP
For environment variables affecting PCP tools, see \fBpmGetOptions\fP(3).
.SH SEE ALSO
.BR PCPIntro (1),
.BR pcp (1),
.BR pmGetOptions (3),
.BR pcp.conf (5)
and
.BR environ (7).

.\" control lines for scripts/man-spell
.\" +ok+ PAGE_SIZE buddyinfo {from pcp-buddyinfo} HighMem
